<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<%@ include file="../include/head.jsp" %>
<%@ include file="../include/top.jsp" %>
<%@ include file="../include/left.jsp" %>
<div class="main-content">

    <div class="main-content-inner">
        <div class="container padded">
            <div class="row">
                <!-- Breadcrumb line -->
                <div id="breadcrumbs">
                    <div class="breadcrumb-button blue">
                        <span class="breadcrumb-label"><i class="icon-home"></i> 主页</span>
                        <span class="breadcrumb-arrow"><span></span></span>
                    </div>
                    <div class="breadcrumb-button">
                        <span class="breadcrumb-label"><i class="icon-list"></i> ETL管理</span>
                        <span class="breadcrumb-arrow"><span></span></span>
                    </div>
                </div>
            </div>
        </div>

        <div class="page-content">
            <div class="row">
                <div class="col-sm-4" >
                    <div class="zTreeBackground left" style="margin-left: 10px; margin-top: 10px">
                        <div>
                            <!--[ <a id="addParent" href="#" title="增加父节点" onclick="return false;">增加父节点</a> ]<br />-->
                            <select id="seleAddNode" style="width: 100px">
                            </select>
                            <a id="edit" href="#" onclick="return false;">&nbsp;[修改名称]&nbsp;</a> <a id="remove" href="#"
                                                                                                    onclick="return false;">
                            [删除]</a>
                        </div>
                        <ul id="treeDemo" class="ztree">
                        </ul>
                    </div>
                </div>
                <div class="col-sm-8" >

                    <ul id="myTab" class="nav nav-tabs">
                        <li class="active"><a href="#nowEditView" data-toggle="tab">当前节点 </a></li>
                        <li><a href="#nowXMLView" data-toggle="tab">XML </a></li>
                    </ul>
                    <div id="myTabContent" class="tab-content">
                        <div class="tab-pane fade in active" id="nowEditView">
                            <div id="divValView" style="display: none;">
                                            <pre id="editorPre" style="width:1000px; height:300px">

                                            </pre>

                            </div>
                            <div id="divConnView" style="display: none;">
                                数据连接：
                                <select id="selConn">

                                </select>
                                <br/>
                                中间内容:<input id="txtmiddleContent" type="text" value=""/>
                            </div>
                            <div id="divQueryView" style="display: none;">
                                <span>ConnectionID:</span> <select id="selQuery">

                            </select>
                                            <pre id="editorQuery" style="width:1000px; height:800px">

                                            </pre>
                            </div>
                            <div id="divScriptView" style="display: none;">
                                <span>ConnectionID:</span><select id="selScript">

                            </select>
                                                <pre id="editorScript" style="width:1000px; height:800px">

                                                </pre>
                            </div>
                            <br/>
                            <div>
                                <button  type="submit" class="btn btn-success"  id="btnValSave"   style="display:none;">保&nbsp;存</button>
                            </div>
                        </div>
                        <div class="tab-pane fade" id="nowXMLView" style="">
                                    <pre id="editor" style="width:1000px; height:800px">

                                    </pre>
                            <button type="submit" class="btn btn-success"  onclick="btnSaveXML_click()" >保&nbsp;存</button>
                            <input type="hidden" id="hidJobID" />
                            <input type="hidden" id="hidJobName" />
                        </div>
                    </div>



                </div>
            </div>

        </div>
    </div>
</div>

<!--隐藏字段 ---------->
<input type="hidden" id="hidID" />
<input type="hidden" id="hidPID" />
<input type="hidden" id="hidName" />
<input type="hidden" id="hidTreeType" />

<script src="<c:url value="/res/js/mytree.js"/> "></script>

<script type="text/javascript">
    var editor = ace.edit("editor");
    editor.session.setMode("ace/mode/xml");

    editor.getSession().setValue("");

    var editorPre = ace.edit("editorPre");
    editorPre.session.setMode("ace/mode/xml");

    var editorQuery = ace.edit("editorQuery");
    editorQuery.session.setMode("ace/mode/sql");

    //editorQuery.getSession().setValue("<xml><query>select * from TableName</query></xml>");

    var editorScript = ace.edit("editorScript");
    editorScript.session.setMode("ace/mode/sql");

    //editorScript.getSession().setValue("<xml><script>select * from TableName <\/script> </xml>");
</script>

<style type="text/css">
    .line {
        margin-bottom: 20px;
    }

    /* 复制提示 */
    .copy-tips {
        position: fixed;
        z-index: 999;
        bottom: 50%;
        left: 50%;
        margin: 0 0 -20px -80px;
        background-color: rgba(0, 0, 0, 0.2);
        filter: progid:DXImageTransform.Microsoft.Gradient(startColorstr=#30000000, endColorstr=#30000000);
        padding: 6px;
    }

    .copy-tips-wrap {
        padding: 10px 20px;
        text-align: center;
        border: 1px solid #F4D9A6;
        background-color: #FFFDEE;
        font-size: 14px;
    }
</style>


<%@ include file="../include/bottom.jsp" %>